package com.xiejr.api.dto.product;

import com.xiejr.model.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("商品规格 每一件商品都有不同的规格，不同的规格又有不同的价格和优惠力度，规格表为此设计数据传输对象")
public class ItemsSpecDTO extends BaseEntity.BaseDTO {
    private static final long serialVersionUID = 489810802455864349L;
    /**
     * 商品规格id
     */
    @ApiModelProperty(value = "商品规格id")
    @NotEmpty(message = "商品规格id不得为空")
    private String id;


    /**
     * 商品外键id
     */
    @ApiModelProperty(value = "商品外键id")
    @NotEmpty(message = "商品外键id不得为空")
    private String itemId;


    /**
     * 规格名称
     */
    @ApiModelProperty(value = "规格名称")
    @NotEmpty(message = "规格名称不得为空")
    private String name;


    /**
     * 库存
     */
    @ApiModelProperty(value = "库存")
    @NotNull(message = "库存不得为空")
    private Integer stock;


    /**
     * 折扣力度
     */
    @ApiModelProperty(value = "折扣力度")
    @NotNull(message = "折扣力度不得为空")
    private Double discounts;


    /**
     * 优惠价
     */
    @ApiModelProperty(value = "优惠价")
    @NotNull(message = "优惠价不得为空")
    private Double priceDiscount;


    /**
     * 原价
     */
    @ApiModelProperty(value = "原价")
    @NotNull(message = "原价不得为空")
    private Double priceNormal;


    /**
     * 进货价格
     */
    @ApiModelProperty(value = "进货价格")
    @NotNull(message = "进货价格不得为空")
    private Double pricceIn;


    /**
     * 送多少积分
     */
    @ApiModelProperty(value = "送多少积分")
    @NotNull(message = "送多少积分不得为空")
    private Long point;


}